﻿using UnityEngine;
using System.Collections;

public class SilverKey : MonoBehaviour 
{
	public AudioClip soundfx;	

	void OnTriggerEnter(Collider other)
	{
	
		if(other.gameObject.tag == "Player")
		{
			audio.Play();
			Debug.Log("voce pegou a chave");
			Player.have_key_silver = true;	
			Player.score += 2000;
		}
		
		if(Player.have_key_silver)
		{
			renderer.enabled = false;
			collider.enabled = false;
		}
	
	}
}
